﻿// ------------------------------------------------------------------------------------
//      Copyright (c) 2013 uhavemyword@gmail.com. All rights reserved.
//      Created by Ben at 01/04/2013 12:58:12
// ------------------------------------------------------------------------------------

namespace CP.General
{
    using System;

    public sealed class Singleton<T>
    {
        private static readonly Lazy<T> _instance = new Lazy<T>(); // Make use of Lazy(T) which is thread safe.

        private Singleton()
        {
        }

        public static T Instance
        {
            get { return _instance.Value; }
        }
    }
}
